<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvs" width="400"  height="400" style="border:1px solid red"></canvas>
    <script>
        var cvs = document.getElementById("canvs");
        var cxt = cvs.getContext("2d");
        cxt.moveTo(100 , 60);
        cxt.lineTo(300, 90);
        cxt.strokeStyle = "red";
        cxt.lineWidth="5"
        cxt.stroke()
    </script>
</body>
</html>